<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\facade\Route;

Route::group('api',function(){
    // Demo资源路由
    //Route::resource(':version/demo','api/:version.Demo');
    Route::get(':version/demo/index', 'api/:version.Demo/index');
    Route::get(':version/demo/create/:id', 'api/:version.Demo/create');
    Route::post(':version/demo/save', 'api/:version.Demo/save');
    Route::get(':version/demo/read/:id', 'api/:version.Demo/read');
    Route::get(':version/demo/read/:id/edit', 'api/:Demo.Invite/edit');
    Route::put(':version/demo/update/:id', 'api/:version.Demo/update');
    Route::delete(':version/demo/delete/:id', 'api/version.Demo/delete');

    // miss路由，所有未定义的请求都走此方法
    Route::miss('api/common/miss');
});
